<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			.box{
				/*box盒子的总宽度：width300px+padding-left50px
				 需求：实现box的总宽度为300
				 方法1：新width=原width-padding-left=300-50=250
				 方法2：设置盒子模式
				 * */
				width: 300px;
				height: 200px;
				margin: 50px auto;
				background-color: green;
				padding-left: 50px;
				box-sizing: border-box;
			}
			.box2{
				width: 50%;
				height: 100px;
				background-color: orange;
			}
		</style>
	</head>
	<body>
		<div class="box">
			<div class="box2">
				
			</div>
		</div>
	</body>
</html>
